from typing import *


class Solution:
    def areaOfMaxDiagonal(self, dimensions: List[List[int]]) -> int:

        n, m = 0, 0
        for a, b in dimensions:
            if (c := (a * a + b * b)) > n:
                n = c
                m = a * b
            elif c == n and (d := a * b) > m:
                m = d

        return m
